import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/list_calendar_detail_entity.dart';

ListCalendarDetailEntity $ListCalendarDetailEntityFromJson(Map<String, dynamic> json) {
	final ListCalendarDetailEntity listCalendarDetailEntity = ListCalendarDetailEntity();
	final String? calendarOfDay = jsonConvert.convert<String>(json['calendarOfDay']);
	if (calendarOfDay != null) {
		listCalendarDetailEntity.calendarOfDay = calendarOfDay;
	}
	final String? calendarOfMonth = jsonConvert.convert<String>(json['calendarOfMonth']);
	if (calendarOfMonth != null) {
		listCalendarDetailEntity.calendarOfMonth = calendarOfMonth;
	}
	final String? calendarOfYear = jsonConvert.convert<String>(json['calendarOfYear']);
	if (calendarOfYear != null) {
		listCalendarDetailEntity.calendarOfYear = calendarOfYear;
	}
	final ListCalendarDetailCancelSchedule? cancelSchedule = jsonConvert.convert<ListCalendarDetailCancelSchedule>(json['cancelSchedule']);
	if (cancelSchedule != null) {
		listCalendarDetailEntity.cancelSchedule = cancelSchedule;
	}
	final String? isSelf = jsonConvert.convert<String>(json['isSelf']);
	if (isSelf != null) {
		listCalendarDetailEntity.isSelf = isSelf;
	}
	final String? isWork = jsonConvert.convert<String>(json['isWork']);
	if (isWork != null) {
		listCalendarDetailEntity.isWork = isWork;
	}
	final List<ListCalendarDetailScheduleList>? scheduleList = jsonConvert.convertListNotNull<ListCalendarDetailScheduleList>(json['scheduleList']);
	if (scheduleList != null) {
		listCalendarDetailEntity.scheduleList = scheduleList;
	}
	final String? signCount = jsonConvert.convert<String>(json['signCount']);
	if (signCount != null) {
		listCalendarDetailEntity.signCount = signCount;
	}
	final String? signStatus = jsonConvert.convert<String>(json['signStatus']);
	if (signStatus != null) {
		listCalendarDetailEntity.signStatus = signStatus;
	}
	final String? userId = jsonConvert.convert<String>(json['userId']);
	if (userId != null) {
		listCalendarDetailEntity.userId = userId;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		listCalendarDetailEntity.userName = userName;
	}
	final String? workDate = jsonConvert.convert<String>(json['workDate']);
	if (workDate != null) {
		listCalendarDetailEntity.workDate = workDate;
	}
	return listCalendarDetailEntity;
}

Map<String, dynamic> $ListCalendarDetailEntityToJson(ListCalendarDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['calendarOfDay'] = entity.calendarOfDay;
	data['calendarOfMonth'] = entity.calendarOfMonth;
	data['calendarOfYear'] = entity.calendarOfYear;
	data['cancelSchedule'] = entity.cancelSchedule?.toJson();
	data['isSelf'] = entity.isSelf;
	data['isWork'] = entity.isWork;
	data['scheduleList'] =  entity.scheduleList?.map((v) => v.toJson()).toList();
	data['signCount'] = entity.signCount;
	data['signStatus'] = entity.signStatus;
	data['userId'] = entity.userId;
	data['userName'] = entity.userName;
	data['workDate'] = entity.workDate;
	return data;
}

ListCalendarDetailCancelSchedule $ListCalendarDetailCancelScheduleFromJson(Map<String, dynamic> json) {
	final ListCalendarDetailCancelSchedule listCalendarDetailCancelSchedule = ListCalendarDetailCancelSchedule();
	final String? beSure = jsonConvert.convert<String>(json['beSure']);
	if (beSure != null) {
		listCalendarDetailCancelSchedule.beSure = beSure;
	}
	final String? cancelReason = jsonConvert.convert<String>(json['cancelReason']);
	if (cancelReason != null) {
		listCalendarDetailCancelSchedule.cancelReason = cancelReason;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		listCalendarDetailCancelSchedule.status = status;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		listCalendarDetailCancelSchedule.updateTime = updateTime;
	}
	final String? userId = jsonConvert.convert<String>(json['userId']);
	if (userId != null) {
		listCalendarDetailCancelSchedule.userId = userId;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		listCalendarDetailCancelSchedule.userName = userName;
	}
	final String? workDate = jsonConvert.convert<String>(json['workDate']);
	if (workDate != null) {
		listCalendarDetailCancelSchedule.workDate = workDate;
	}
	return listCalendarDetailCancelSchedule;
}

Map<String, dynamic> $ListCalendarDetailCancelScheduleToJson(ListCalendarDetailCancelSchedule entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['beSure'] = entity.beSure;
	data['cancelReason'] = entity.cancelReason;
	data['status'] = entity.status;
	data['updateTime'] = entity.updateTime;
	data['userId'] = entity.userId;
	data['userName'] = entity.userName;
	data['workDate'] = entity.workDate;
	return data;
}

ListCalendarDetailScheduleList $ListCalendarDetailScheduleListFromJson(Map<String, dynamic> json) {
	final ListCalendarDetailScheduleList listCalendarDetailScheduleList = ListCalendarDetailScheduleList();
	final String? beSure = jsonConvert.convert<String>(json['beSure']);
	if (beSure != null) {
		listCalendarDetailScheduleList.beSure = beSure;
	}
	final String? cancelReason = jsonConvert.convert<String>(json['cancelReason']);
	if (cancelReason != null) {
		listCalendarDetailScheduleList.cancelReason = cancelReason;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		listCalendarDetailScheduleList.status = status;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		listCalendarDetailScheduleList.updateTime = updateTime;
	}
	final String? userId = jsonConvert.convert<String>(json['userId']);
	if (userId != null) {
		listCalendarDetailScheduleList.userId = userId;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		listCalendarDetailScheduleList.userName = userName;
	}
	final String? workDate = jsonConvert.convert<String>(json['workDate']);
	if (workDate != null) {
		listCalendarDetailScheduleList.workDate = workDate;
	}
	return listCalendarDetailScheduleList;
}

Map<String, dynamic> $ListCalendarDetailScheduleListToJson(ListCalendarDetailScheduleList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['beSure'] = entity.beSure;
	data['cancelReason'] = entity.cancelReason;
	data['status'] = entity.status;
	data['updateTime'] = entity.updateTime;
	data['userId'] = entity.userId;
	data['userName'] = entity.userName;
	data['workDate'] = entity.workDate;
	return data;
}